<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Title</title>
    <script type="text/javascript" src="js/jquery-1.12.2.min.js"></script>
</head>
<body>
    账户当前余额： <span></span>元
<script>
    function updateHead() {
        $.ajax({
            type:"get",
            url:"user/query.do",
            dataType:"json",
            success: function (data) {
                if (data.code == 1){
                    $("span").html(data.info.balance);
                }
            }
        })
    }

    $(function () {
        updateHead();
    })
</script>
</body>
</html>